
<%@ page import="buscar.Financiamento"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name="layout" content="main" />
<g:set var="entityName"
	value="${message(code: 'financiamento.label', default: 'Financiamento')}" />
<title>Dados Financiamento</title>
</head>
<body>
	<div class="nav">
		<span class="menuButton"><a class="home"
			href="${createLink(uri: '/')}"><g:message
					code="default.home.label" /> </a> </span> <span class="menuButton"><g:link
				class="create" action="create">
				<g:message code="default.new.label" args="[entityName]" />
			</g:link> </span>
	</div>
	<div class="body">
		<h1>Dados Financiamento</h1>
		<g:if test="${flash.message}">
			<div class="message">
				${flash.message}
			</div>
		</g:if>
		<div class="list">
			<table>
				<thead>
					<tr>
						<td>Dados Veiculo</td>
						<td>Dados Fianciamento</td>
					</tr>
				</thead>
				<tr>
					<td>
						<table>
							<tbody>
								<tr class="odd">
									<td>Marca</td>
									<td>${financiamento.Marca }</td>
								</tr>								
								<tr class="even">
									<td>Modelo</td>
									<td>${financiamento.Modelo }</td>
								</tr>
								<tr class="odd">
									<td>Ano</td>
									<td><g:formatDate format="yyyy" date="${financiamento.Ano }"/></td>
								</tr>								
								<tr class="even">
									<td>Estado</td>
									<td>${financiamento.Estado }</td>
								</tr>
							</tbody>
						</table></td>
					<td>
						<table>
							<tbody>								
								<tr class="even">
									<td>Valor do Veiculo</td>
									<td><g:formatNumber number="${financiamento.ValorVeiculo}"
											type="currency" />
									</td>
								</tr>
								<tr class="odd">
									<td>Valor de Entrada</td>
									<td><g:formatNumber number="${financiamento.ValorEntrada}"
											type="currency" />
									</td>
								</tr>
								<tr class="even">
									<td>Valor do Financiamento</td>
									<td><g:formatNumber
											number="${financiamento.ValorVeiculo - financiamento.ValorEntrada}"
											type="currency" />
									</td>
								</tr>
								<tr class="odd">
									<td>Quantidade de parcelas</td>
									<td><g:formatNumber number="${financiamento.Parcela}" />
									</td>
								</tr>
								<tr class="even">
									<td>Valor da Parcela</td>
									<td><g:formatNumber number="${financiamento.ValorParcela}"
											type="currency" />
									</td>
								</tr>
								<tr class="odd">
									<td>Valor final a ser pago</td>
									<td><g:formatNumber
											number="${financiamento.ValorParcela * financiamento.Parcela}"
											type="currency" />
									</td>
								</tr>
								
							</tbody>
						</table>
					</td>
				</tr>
			</table>
		</div>
		<span class="button"><g:submitButton name="Simular"
						class="save" value="Simular" /> </span>

	</div>
</body>
</html>
